package com.le.tester.onjava8.l_3_6;

import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;

/**
 * createTime：2023/2/7 10:43
 * description：使用supplier填充collections
 */
class Government implements Supplier<String> {

    static String[] foundation = (
            "strange women lying in ponds "
                    + "distributing swords is ro basis "
                    + "for a system of government"
    ).split(" ");

    private int index;

    @Override
    public String get() {
        return foundation[index++];
    }
}

public class SuppliersCollectionsTest {

    public static void main(String[] args) {
        //Suppliers
    }
}
